package com.malamute.system.action.system;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;

import com.malamute.core.action.BaseAction;
import com.malamute.system.entity.TreeNode;
import com.malamute.system.service.TreeService;

/**
 * 树操作Action
 * 
 */
public class TreeAction extends BaseAction {
	@Autowired
	private TreeService treeService;

	private List<TreeNode> treeNodes;

	public String listFoldenTree() {
		treeNodes = treeService.listFoldensTree();
		return LIST;
	}

	public String listTree() {
		treeNodes = treeService.listTree();
		return LIST;
	}

	public String listTreeAjax() {
		treeNodes = treeService.listTree();
		return JSON;
	}

	public List<TreeNode> getTreeNodes() {
		return treeNodes;
	}

	public void setTreeNodes(List<TreeNode> treeNodes) {
		this.treeNodes = treeNodes;
	}

}
